import pytest


def result_demo(aa: float, bb: float, cc: float, dd: float) -> int:
    result = -1
    if aa > 0 and bb > 0:
        result = 0
    else:
        result = 1
    if cc + dd > 1:
        result = 2
    else:
        result = 3
    return result
# end def


# test_inst = [(1, 1, 1, 1, 2), (0, 1, 0, 0, 3)]  # test instances
# test_inst = [(1, 1, 1, 1, 2), (0, 0, 0, 0, 3)]  # test instances
# test_inst = [(1, 1, 1, 1, 2), (1, 0, 0, 0, 3), (0, 1, 1, 1, 2), (0, 0, 0, 0, 3)]  # test instances
test_inst = [(1, 1, 1, 1, 2), (1, 1, 0, 0, 3), (0, 1, 1, 1, 2), (0, 0, 0, 0, 3)]  # test instances


@pytest.mark.parametrize("a, b, c, d, expected", test_inst)
def test_result_demo(a, b, c, d, expected):
    assert expected == result_demo(a, b, c, d)
# end def
